Skip to content

Gate admin design system by inbox access - #1439

Merged
evebouf merged 5 commits into
mainfrom
codex/design-system-permission
Sep 21, 2026
Merged

evebouf merged 5 commits into
mainfrom
codex/design-system-permission

Conversation

@evebouf

@evebouf evebouf commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Changes

  • Restrict Design System Show the admin design-system navigation and resolve its route only for principals granted the existing inbox permission; direct unauthorized requests to canonical, legacy /design, and trailing-slash routes return not found.
  • Share Email Allowlist Reuse one case-insensitive INBOX_USERS matcher across the web inbox/calendar surfaces and the admin surface, including the existing all override. Register it once as an optional operator secret for both components so supported deployments inject the same private value without committing addresses.
  • Verify Both States Cover allowlisted and denied routes, permission bootstrap, navigation behavior, case normalization, inbox behavior, and deployment-secret routing; 230 admin tests, 29 focused web tests, and 72 focused CLI deployment tests pass with plugin and CLI typechecks, focused lint, formatting, and live UI QA.

Screenshots

  • Allowlisted The existing Design system entry appears at the bottom of the admin navigation.

Allowlisted admin navigation

  • Not Allowlisted The admin navigation ends at Crons and does not expose the Design system entry.

Denied admin navigation

Risk assessment

  • Stylistic frontend only: No The change alters route authorization, permission data flow, navigation availability, and deployment-secret routing.
  • Logic changes: Present The Design System now reuses the existing Inbox and Calendar allowlist, and deployment tooling routes that same private value to the admin runtime.
  • Security risk: Low The change narrows access, adds no new authentication mechanism or public endpoint, stores no addresses in Git, and fails closed when the allowlist is absent or incorrect.
  • Risk level: High · Safe to auto-merge: No “High” is the repository's categorical label for permission changes, not an assessment that major breakage is likely. The practical blast radius is limited to visibility and access for three opt-in UI surfaces: it cannot modify stored data, run migrations, affect core agent execution, change billing, or alter public APIs. The credible failure mode is temporary denial of those surfaces from a misconfigured allowlist rather than unauthorized disclosure, but permission changes still warrant explicit human review.

@evebouf evebouf self-assigned this Sep 19, 2026
@evebouf
evebouf requested review from 16francej and ReganBell and a lite review from Copilot September 19, 2026 04:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The route guard does not normalize trailing-slash paths, allowing unauthorized /design-system/ requests to receive the admin shell instead of a 404.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

This pull request gates the admin Design System by the existing inbox allowlist and centralizes case-insensitive principal matching.

Changes:

  • Shares INBOX_USERS matching across web and admin surfaces.
  • Adds admin permission bootstrap and route/navigation gating.
  • Expands tests for permissions, routing, and allowlist behavior.
File Summary
plugins/​web-ui/​test/​inbox-source.test.ts Tests shared inbox allowlist usage.
plugins/​web-ui/​server/​index.ts Reuses the shared matcher.
plugins/​chassis/​src/​principal-allowlist.ts Provides reusable principal matching.
plugins/​admin/​test/​whoami.test.ts Tests permission bootstrap.
plugins/​admin/​test/​principal-allowlist.test.ts Tests normalization and the all override.
plugins/​admin/​test/​default-view.test.ts Tests client-side route gating.
plugins/​admin/​test/​branding.test.ts Tests authorized and denied routes.
plugins/​admin/​src/​index.ts Adds permissions and server route authorization.
plugins/​admin/​public/​index.html Gates Design System navigation and client routing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread plugins/admin/src/index.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved route authorization, permission preservation, and admin configuration findings block approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

Comment thread plugins/admin/src/index.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Configure INBOX_USERS for standalone admin deployments and preserve existing admin permissions.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

Comment thread plugins/admin/src/index.ts
@evebouf
evebouf merged commit e3242b4 into main Sep 21, 2026
20 checks passed
@evebouf
evebouf deleted the codex/design-system-permission branch September 21, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants